home *** CD-ROM | disk | FTP | other *** search
/ Aminet 23 / Aminet 23 (1998)(GTI - Schatztruhe)[!][Feb 1998].iso / Aminet / util / cli / rep.readme < prev    next >
Encoding:
Text File  |  1998-01-06  |  3.1 KB  |  89 lines

  1. Short:    Replace strings in files (CLI-Pure)
  2. Author:   dck@prometheus.hol.gr (D. Keletsekis)
  3. Uploader: dck@prometheus.hol.gr (D. Keletsekis)
  4. Version:  1.3
  5. Type:     util/cli
  6. Requires: WB 2+
  7.  
  8. REP is a small, fast CLI command for replacing strings in files.
  9. It is pure and can be made resident.
  10.  
  11. This version adds the ability to define HEX and non-printable
  12. characters in the string (read on..)
  13.  
  14.   Usage :   
  15. -------------
  16. > Rep FromFile/A, String/A, ToString/A, ToFile, I=Insensitive/S
  17.  
  18.   Where :
  19. -------------
  20. FromFile    - is the file you want to convert.
  21. String      - The string you want to replace
  22. ToString    - What you want to replace it with 
  23. ToFile      - (Optional) the name of the output file. If this is 
  24.               not given, then the INPUT FILE WILL BE OVERWRITEN!
  25. Insensitive - (Optional) Make the search case-insensitive
  26.  
  27.   Example :
  28. --------------
  29. rep df0:MyFile ThisString ThatString Insensitive
  30. - will replace all occurences of "ThisString" (or THISstring, or 
  31.   ThIsStRiNg etc) with "ThatString" and save it over the original
  32.   file.
  33.  
  34. "String" and "ToString" are parsed and may contain HEX, DECIMAL 
  35. and other non-printable characters. The way to do this is:
  36.  
  37. The "\" character starts a character specification :
  38.  
  39.    \n     - is the Newline character (decimal 10)
  40.    \r     - is the carriage return
  41.    \t     - is the TAB character
  42.    \\     - is the \ character itself
  43.    \"     - is the " character
  44.    \'     - is the ' character
  45.  
  46.    \x     - starts a HEX character string, defined by pairs
  47.             of HEX digits (0-9,A-F) until another \ character
  48.             or the end of the string are encountered. 
  49.             ex: MyString\x000003F3\continues
  50.  
  51.    \#     - starts a DECIMAL character, defined by a number 
  52.             from 0-255. Again, the number ends with another
  53.             \ character or the end of the string.
  54.             ex: "\#155\32mWhite text"
  55.  
  56.    Any other character will be considered literally, i.e.
  57.    \c     - is the "c" character.
  58.  
  59. There is also a GUI script included, which makes this litle
  60. command very powerful & easy to use if you want to make the
  61. same replacements in a lot of files. A preview is included.
  62.  
  63. The GUI needs a program called Gui4Cli (also written by yours
  64. truly and what a great program it is too :), available at :
  65.  
  66. 1.-   http://users.hol.gr/~dck/gcmain.htm
  67. 2.-   Aminet, under Dev/Gui/Gui4Cli.lha
  68.  
  69. D. Keletsekis - dck@prometheus.hol.gr
  70. Novemeber 1997
  71.  
  72. This program is FreeWare, but remains the Copyright of D.Keletsekis.
  73. No guarantees as to it's performance and actions is made or implied.
  74. Use it at your own risk. 
  75.  
  76.  
  77. ============================= Archive contents =============================
  78.  
  79. Original  Packed Ratio    Date     Time    Name
  80. -------- ------- ----- --------- --------  -------------
  81.      628     267 57.4% 03-Oct-97 21:32:34  REP.info
  82.     1472    1105 24.9% 03-Oct-97 21:32:44 +Rep
  83.     6056    2009 66.8% 03-Oct-97 21:35:10 +Rep.gc
  84.      590     192 67.4% 03-Oct-97 21:35:10 +Rep.gc.info
  85.     2594    1262 51.3% 03-Oct-97 21:34:20 +Rep.readme
  86.    14870    3877 73.9% 03-Oct-97 21:34:38 +RepGrab.iff
  87. -------- ------- ----- --------- --------
  88.    26210    8712 66.7% 11-Nov-97 22:44:24   6 files
  89.